home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10577 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.mountain.net!usenet
  2. From: Michael Wallace <mjwpop@ovnet.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: help with array initialization
  5. Date: Fri, 08 Mar 1996 12:42:52 -0800
  6. Organization: MountainNet, Inc. Morgantown WV 800.444.1458
  7. Message-ID: <31409BCC.2FCD@ovnet.com>
  8. NNTP-Posting-Host: xtsk2.ovnet.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (Win16; I)
  13.  
  14. I am a student learning c++ and have a question concerning initialization 
  15. of arrays.  The textbook I am using (C++, How to program) says that you 
  16. can initialize arrays in this manner - int array[100]={0}; anytime.  
  17. However, trying to compile this with Borland Turbo C++ 4.5 gives an 
  18. error, it only allows that type of initialization if the variable is 
  19. declared static.  I have another reference manual (C++, The Complete 
  20. Reference) and as far as I can find, it doesn't say which is correct. If 
  21. someone would please tell me if the textbook or the comipiler is correct?
  22.  
  23. Bruce Ritchie
  24.